import React, { Component } from 'react';
import {Consumer} from './Context'
class Parent extends Component {
    render() {
        return (
            <Consumer>
                {(params) => {
                    console.log(params)
                    return <div>
                        同级父组件
                    </div>
                }}
            </Consumer>
        );
    }
}

export default Parent;